package com.macro.mall.portal.domain;

import com.macro.mall.security.component.BaseUserDetails;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
 * SpringSecurity需要的用户信息封装类
 * Created by macro on 2018/8/3.
 */
@Slf4j
public class MemberDetails extends BaseUserDetails {
    @Getter
    @Setter
    private UmsMemberVO umsMemberVO;



    public MemberDetails(UmsMemberVO umsMember) {
        super(umsMember.getId(), umsMember.getNickname(), umsMember.getUsername(), umsMember.getPassword(),
                umsMember.getStatus() == 1, true, true, true, umsMember.getPermissions());
    }
}
